﻿using System;

namespace Vbyte.DataSource.Cache
{
    /// <summary>
    /// 对象标志识别
    /// </summary>
    public interface IObjectIdentification<T>
        where T:class
    {
        /// <summary>
        /// 获取该对象的标志
        /// </summary>
        /// <returns></returns>
        T GetIdentity();

        /// <summary>
        /// 设置该对象的标志
        /// </summary>
        /// <param name="identity">标志值存储对象</param>
        void SetIdentity(T identity);
    }
}
